package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ExpendMapper;
import com.ruoyi.system.domain.Expend;
import com.ruoyi.system.service.IExpendService;
import com.ruoyi.common.core.text.Convert;

/**
 * 支出信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-16
 */
@Service
public class ExpendServiceImpl implements IExpendService 
{
    @Autowired
    private ExpendMapper expendMapper;

    /**
     * 查询支出信息
     * 
     * @param id 支出信息主键
     * @return 支出信息
     */
    @Override
    public Expend selectExpendById(Long id)
    {
        return expendMapper.selectExpendById(id);
    }

    /**
     * 查询支出信息列表
     * 
     * @param expend 支出信息
     * @return 支出信息
     */
    @Override
    public List<Expend> selectExpendList(Expend expend)
    {
        return expendMapper.selectExpendList(expend);
    }

    /**
     * 新增支出信息
     * 
     * @param expend 支出信息
     * @return 结果
     */
    @Override
    public int insertExpend(Expend expend)
    {
        return expendMapper.insertExpend(expend);
    }

    /**
     * 修改支出信息
     * 
     * @param expend 支出信息
     * @return 结果
     */
    @Override
    public int updateExpend(Expend expend)
    {
        return expendMapper.updateExpend(expend);
    }

    /**
     * 批量删除支出信息
     * 
     * @param ids 需要删除的支出信息主键
     * @return 结果
     */
    @Override
    public int deleteExpendByIds(String ids)
    {
        return expendMapper.deleteExpendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除支出信息信息
     * 
     * @param id 支出信息主键
     * @return 结果
     */
    @Override
    public int deleteExpendById(Long id)
    {
        return expendMapper.deleteExpendById(id);
    }
}
